<!DOCTYPE html>
<html lang="en" style="visibility: hidden">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="apple-mobile-web-app-capable" content="none" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
    <meta name="HandheldFriendly" content="true">
    <!-- 微软的老式浏览器 -->
    <!-- 微软的老式浏览器 -->
    <meta name="MobileOptimized" content="320">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no">
    <script type="text/javascript" charset="utf-8"  src="${basePath}static/js/DES3.js"></script>
    <script type="text/javascript" src="${basePath}/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="${basePath}/static/js/merchant/ajaxService.js"></script>
    <!--[if IE]>
    <script type="text/javascript" src="${basePath}/static/js/merchant/fuckIE.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="${basePath}uploadFiles/favicon.ico" type="image/x-icon">
    <title>中银快缴</title>
    <style>
        body{
            background-image: url("${basePath}static/images/pc_bg.png");
            background-repeat: no-repeat;
            -webkit-background-size:100% 100%;
            background-size:100% 100%;
        }
        .loginBox .login_no_qlogin{
            position: absolute;
            left: 50%;
            top: 55%;
            -webkit-transform: translate(-50%,-50%);
            -moz-transform: translate(-50%,-50%);
            -ms-transform: translate(-50%,-50%);
            -o-transform: translate(-50%,-50%);
            transform: translate(-50%,-50%);
            background-color: transparent;
            padding: 0;
            width:auto;
        }
        .loginBox .login_no_qlogin:before{
            content: '微信综合服务平台';
            font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            width: 100%;
            text-align: center;
            font-size: 33px;
            position: absolute;
            top:-90px;
            left: 50%;
            -webkit-transform: translateX(-50%);
            -moz-transform: translateX(-50%);
            -ms-transform: translateX(-50%);
            -o-transform: translateX(-50%);
            transform: translateX(-50%);
            color: #00aaee;
        }
        .loginBox{
            width: 100%;
            height: 100% !important;
            position: relative;

        }
        .loginBox .inputOuter{
            border: none;
        }
        .loginBox .inputOuter input{
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            padding-left: 10px;
            background-color: #fff;
            border: 1px solid #ccc;
        }
        .loginBox .uinArea{
            height: 35px;
        }
        .loginBox .pwdArea{
            height: 50px;
        }
        .loginBox .inputOuter input:focus{
            border:1px solid #ff4444 ;
        }
        .loginBox .login_button{
            width: 120px;
            position: absolute;
            left: 50%;
            top: 0;
            -webkit-transform: translateX(-50%);
            -moz-transform: translateX(-50%);
            -ms-transform: translateX(-50%);
            -o-transform: translateX(-50%);
            transform: translateX(-50%);
        }
        .loginBox .login_button input{
            width: 120px;
            background-color: #ff4444;
        }

        .clearfix:after {
            content: " ";
            display: block;
            clear: both;
            height: 0;
        }
        .clearfix {
            zoom: 1;
        }
    </style>

</head>
<body linkId="main">
<#include "common/_header.html" />
<div class="loginBox clearfix">
    <div class="login_no_qlogin" id="loginbox">
        <form method="post" name="loginForm" id="loginForm" autocomplete="new-password">
            <div class="uinArea" id="uinArea">
                <div class="inputOuter">
                    <input type="text" class="inputstyle" id="comUserName" name="comUserName" maxlength="30"  placeholder="请输入用户名" tabindex="1" autocomplete="new-text"/>
                    <a class="uin_del" id="uin_del" href="javascript:restInput();"></a>
                </div>
            </div>
            <div class="pwdArea" id="pwdArea">
                <div class="inputOuter">
                    <input type="password" placeholder="密码" class="inputstyle password" id="password" name="password" maxlength="16" tabindex="2" autocomplete="new-password"/>
                </div>
            </div>
            <div class="pwdArea" >
                <div class="inputOuter" style="width: 173px;display: inline-block;margin-right: 20px;margin-top: 6px;">
                    <input type="text" name="logCode" maxlength="4" id="logCode" class="inputstyle password"/>
                </div>
                <img style="height: 35px;width: 74px;" id="codeImg" alt="点击更换"
                     title="点击更换" src="" />
            </div>

            <div class="bottom" id="bottom_web">

            </div>
            <div class="submit">
                <a class="login_button" href="javascript:void(0);">
                    <input type="button" id="userlogin" tabindex="6" value="登 录" class="loainbut"  />
                </a>
            </div>
        </form>
    </div>

</div>

<#include "common/_footermain.html" />

<!--[if IE]>
<script>
    function goIEPage123(ieNumber){
        if (ieNumber < 9){
            //window.location.href = '${basePath}/notice_manage_IE';
            window.location.href="${basePath}/upBower";
            return
        }else{
            $("html").css({'visibility':'visible'});
        }
    }
    goIEPage123(IEVersion());
</script>
<![endif]-->
<!--[if !IE]><!-->
<script>
    $("html").css({'visibility':'visible'});
</script>
<!--<![endif]-->
<script type="text/javascript">




    var basePath = "${basePath}";

    $(function(){
        if(location.href.indexOf('#reloaded')==-1){
            location.href=location.href+"#reloaded";
            location.reload();
        }
    });
    (function(){
        var requireJS = [];
        _GLOBE_DATA("loadJS")(requireJS,basePath+"static/js/index.js");
        var status = '${status}';


    })();
    $(document).ready(function () {
        var mark = '${Mark}';
        if(mark =="NOrep"){
            $("#loginbox").attr("style","display:none;");
            $("#pwinbox").attr("style","display:block;");
        }


    });

    $("#titleContent ul li").on("click",function(){
        $("#titleContent ul li").removeClass("tabActive");
        $("#titleContent ul li a").hide();
        $(".aside-contentJ").hide();
        var linkId = $(this).attr("linkId");
        $(this).find("a").show();
        $("#"+linkId).show();
        $(this).addClass("tabActive");

    });
    $("#codeImg").attr("src", "verifyCode?t=" + genTimestamp());

    $("#codeImg").on("click",function(){
        $("#codeImg").attr("src", "verifyCode?t=" + genTimestamp());
    });
    function genTimestamp() {
        var time = new Date();
        return time.getTime();
    }

    _GLOBE_DATA("autoMianHeight")();


    //校验输入的原始密码是否正确
    function checkPassword() {

        var pwdval = $('#oPassword').val();
        $('#oPassword').val( DES3.encrypt("x1234g6789abcd012345w789",$('#oPassword').val()));

        $.ajax({
            url: "${basePath}/check/checkPassword",
            data: $("#pwForm").serialize(),
            type: "POST",
            success: function (data) {
                if (data.status == 'success') {
                    $("#oPassword").tips({
                        side: 2,
                        msg: '原密码正确!',
                        bg: '#393d49',
                        time: 3
                    });
                } else {
                    $("#oPassword").tips({
                        side: 2,
                        msg: '原密码错误!',
                        bg: '#393d49',
                        time: 3
                    });
                }
                $('#oPassword').val();
            }
        });
    }

    $("#userlogin").bind("click",function(){
        var pwdval = $('#password').val();
        var options={comUserName:$("#comUserName").val(),password:md5(pwdval),logCode:$("#logCode").val()};
        var url='${basePath}system/merchant/login_login';
        sendService(url,options,function(data){
            console.log(data.status);
            if(data.status=="success"){
//                if(data.msg =="bankmainPage" ){
                    window.location.href="${basePath}login_toLogin";
//                }else if(data.msg =="mainPage" ){
//                    window.location.href="${basePath}login_toLogin";
//                }
            }else if(data.status=="error") {
                if (data.msg == "jinyong") {
                    alert("对不起您账户已被禁用，请联系银行管理员");
                    window.location.href = "${basePath}system/merchant/main";
                } else if (data.msg == "usererror") {
                    $("#comUserName").tips({
                        side: 2,
                        msg: "用户名输入有误",
                        bg: '#FF5080',
                        time: 3
                    });
                } else if (data.msg == "passerror") {
                    $("#password").tips({
                        side: 2,
                        msg: "密码错误",
                        bg: '#FF5080',
                        time: 3
                    });
                } else if (data.msg == "codeerror") {
                    $("#logCode").tips({
                        side: 2,
                        msg: "验证码错误",
                        bg: '#FF5080',
                        time: 3
                    });
                }
            }
        });
    })
    $('body').keydown(function (e) {
        if(e.keyCode==13){
            $("#userlogin").click();
            $("#logCode").blur();
        }
    });

</script>

</body>
</html>